package com.ktjy;

import entity.pet;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.PetService;

public class testAop {
    @Test
    public void testAop() {
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        pet pet=(pet)context.getBean("pet");
        PetService petService=(PetService)context.getBean("PetServiceImpl");
        petService.save(pet);
        petService.modify(pet);
        petService.del(1);
    }
}
